#include "Engine.hpp"

using namespace Typhoon;

Engine::Engine() {
	stateManager.System = &System;
}

Engine::~Engine() {
}

void Engine::Begin(GameState* state) {
	stateManager.Push(state);
}

bool Engine::Update() {
	float dt = timer.GetDeltaTime();
	if (stateManager.Update(dt)) {
		stateManager.Render();
		return true;
	}
	return false;
}

void Engine::UpdateInput(void* input) {
	stateManager.UpdateInput(input);
}